package factory.simplefactory.pizzastore.order;

import factory.simplefactory.pizzastore.constain.PizzaType;
import factory.simplefactory.pizzastore.factory.PizzaFactory;
import factory.simplefactory.pizzastore.pizza.Pizza;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * 披萨店：生产披萨，订购披萨
 */
public class PizzaStore {
    public static void main(String[] args) {
        OrderPizza orderPizza = new OrderPizza();
        do {
            String type = getType();
            orderPizza.order(type);
        }while (true);
    }
    // 写一个方法，可以获取客户希望订购的披萨种类
    private static String getType() {
        try {
            BufferedReader strin = new BufferedReader(new InputStreamReader(System.in));
            System.out.println("input pizza 种类:");
            String str = strin.readLine();
            return str;
        } catch (IOException e) {
            e.printStackTrace();
            return "";
        }
    }
}
